package com.momo.hotel.service.impl;

import com.momo.hotel.dao.mapping.ext.TbCommentMapperExt;
import com.momo.hotel.dao.pojo.TbComment;
import com.momo.hotel.dao.pojo.ext.TbCommentExt;
import com.momo.hotel.service.CommentService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

@Service
public class CommentServiceImpl implements CommentService {
    @Resource
    TbCommentMapperExt tbCommentMapperExt;
    /**
     * 添加评论
     * @param tbComment
     * @return
     */
    @Override
    public Integer addComment(TbComment tbComment) {
        return tbCommentMapperExt.addComment(tbComment);
    }

    @Override
    public List<TbCommentExt> selectComment(Integer newId) {
        return tbCommentMapperExt.selectComment(newId);
    }
}
